package com.example.fp.cgc.entity

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import org.springframework.format.annotation.DateTimeFormat
import java.util.*

/**
 * @since 2020-03-06
 * @author 蔡
 */
@TableName("notice")
class Notice {
    @TableId(value = "id", type = IdType.AUTO)
    var id: Int = 0

    @TableField("type")
    var type: String = ""

    /**
     * all or single
     */
    @TableField("scope")
    var scope: String = ""

    @TableField("toId")
    var toId: Int = 0

    @TableField("text")
    var text: String = ""

    @TableField("isRead")
    var isRead: Boolean = false

    @TableField("time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var time: Date? = null
}